﻿<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>站内搜索 - {site.name}</title>
<meta name="keywords" content="{site.seo_keyword}" />
<meta name="description" content="{site.seo_description}" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/css/style.css" />
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/weui.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/common.js"></script>
<script type="text/javascript">
$(function(){
    $(".weui-tabbar a").eq(2).addClass("weui-bar__item_on"); //选中Tab
});
</script>
</head>

<body ontouchstart>
<div class="page">
    <!--页面头部-->
    <div class="header">
        <a class="back" href="javascript:history.back();">
            <i class="iconfont icon-arrow-left"></i>
        </a>
        <div class="search-box">
            <div class="input-box">
                <input id="keywords" name="keywords" placeholder="输入关健字" onkeydown="if(event.keyCode==13){SiteSearch('<%linkurl("search")%>', '#keywords');return false};" />
                <a href="javascript:;" onclick="SiteSearch('<%linkurl("search")%>', '#keywords');">
                    <i class="iconfont icon-search"></i>
            	</a>
            </div>
        </div>
        <div class="right"> 
            <a class="weui-cell_access weui-cell_link" href="<%linkurl("index")%>">
                <i class="iconfont icon-home"></i>
            </a>
            </a>
        </div>
    </div>
    <!--/页面头部-->
  
    <!--页面内容-->
    <div class="page__bd">
        <!--内容列表-->
        <!--取得一个DataTable-->
        <%set DataTable list=get_search_list(15, out totalcount)%>
        <!--取得分页页码列表-->
        <%if({tags}!="")%>
            <%set pagelist=get_page_link(15, page, totalcount, linkurl("search","?tags=" + Server.UrlEncode(tags) + "&page=__id__"))%>
        <%else%>
            <%set pagelist=get_page_link(15, page, totalcount, linkurl("search","?keyword=" + Server.UrlEncode(keyword) + "&page=__id__"))%>
        <%/if%>
        <div class="weui-panel weui-panel_access" style="margin-top:10px;">
            <div class="weui-panel__hd">
                <%if({tags}!="")%>
                查询Tags标签：{tags}，共{totalcount}条记录
                <%else%>
                查询关健字：{keyword}，共{totalcount}条记录
                <%/if%>
            </div>
            <div class="weui-panel__bd">
                <div class="txt-list">
                    <ul>
                        <%foreach(DataRow dr in list.Rows)%>
                        <li>
                            <a href="{dr[link_url]}">
                                <%if({dr[img_url]}!="")%>
                                <img src="{dr[img_url]}" />
                                <%/if%>
                                <h2>{dr[title]}</h2>
                                <div class="note">
                                    <p>{dr[remark]}</p>
                                    <p>
                                        <i class="hot"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_article_click&channel_id={dr[channel_id]}&id={dr[id]}"></script>次</i>
                                        <i class="date">时间：<%datetostr({dr[add_time]},yyyy-MM-dd)%></i>
                                    </p>
                                </div>
                            </a>
                        </li>
                        <%/foreach%>
                        <%if({totalcount}==0)%>
                        <div class="nodata">暂无相关记录...</div>
                        <%/if%>
                    </ul>
                </div>
            </div>
        </div>
        <!--/内容列表-->
        
        <!--分页页码-->
        <div class="page-list">
            {pagelist}
        </div>
        <!--/分页页码-->
    
        <!--版权信息-->
        <%template src="_copyright.html"%>
        <!--/版权信息-->

        <!--底部导航-->
        <%template src="_footer.html"%>
        <!--/底部导航-->
    
  </div>
  <!--/页面内容-->

</div>
</body>
</html>
